Title:
|
SPAGHETTI VS. MODULAR CODE THE CHOICE
OF NOVICE PROGRAMMERS |
Author(s):
|
Ilana Lavy and Rami Rashkovits |
ISBN:
|
978-989-8533-87-6 |
Editors:
|
Miguel Baptista Nunes, Pedro Isaías, Philip Powell, Pascal Ravesteijn and Guido Ongena |
Year:
|
2019 |
Edition:
|
Single |
Keywords:
|
Code Modularity, Novice Programmer, Program Design, Cognitive Dissonance Theory, Dual-Process Theory |
Type:
|
Full Paper |
First Page:
|
60 |
Last Page:
|
66 |
Language:
|
English |
Cover:
|
|
Full Contents:
|
click to dowload
|
Paper Abstract:
|
Code modularity is one of the criteria for testing software quality. Nevertheless, novice programmers often tend to avoid
writing modular code. In this study, we aim to explore the circumstances in which novice programmers choose to write
modular code. To address this aim, two student groups, twenty in each, were given a programming task, each in different
configuration. Group-1 was given the task in several phases, each add complexity to the previous one, while Group-2 was
given the entire task at once. The entire task was rather complex and its modular solution requires the definition of few
classes and methods, each responsible to one of the problem's aspects. The students' solutions were analyzed using the
dual-process theory, cognitive dissonance theory and content analysis methods to explore the extent of code modularity.
The analysis revealed the following: (1) as regards to Group-1, a minor increase in the number of modular solutions was
found while they progressed along the phases; (2) The number of modular solutions of Group-2 was higher than of
Group-1. Analysis of students' justifications for lack of code modularity in Group-1 revealed the following. The first
phase of the problem was perceived as rather simple hence many students did not find any reason to invest in designing a
modular solution. When the task got complex in the following phases, some students realized that a modular solution
would fit better, hence a cognitive dissonance was raised. Nevertheless, many of them preferred to continue their course
of non-modular solution instead of re-designing a modular new one. In order to decrease the dissonance they claimed that
this decision saved time. Students of both groups also attributed their non-modular code to lack of explicit criteria for the
evaluation of the code quality that lead them to focus on functionality alone. |
|
|
|
|